package ui.swing.tree;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTree;

public class DefaultTreeDemo extends JFrame {

	private static final long serialVersionUID = -8940432429424707365L;

	public DefaultTreeDemo() {
		super("我是树");
		setBounds(200,200,320,500);
		
		JTree tree = new JTree();
		JScrollPane jsp = new JScrollPane();
		jsp.setViewportView(tree);
		
		getContentPane().add(jsp);
		pack();
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setVisible(true);
	}
	
	public static void main(String[] args) {
		new DefaultTreeDemo();
	}
	
}
